﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Configuration;

namespace WAD.WEB.AppCode
{
    public class WJXConfig
    {
        public static class Path
        {
            /// <summary>
            /// 微街秀域名 如：http://wjx.711688.com
            /// </summary>
            public static string URL = ConfigurationManager.AppSettings["domain"];
            /// <summary>
            /// 分享跳转的域名
            /// </summary>
            public static string Redirect_Domain = ConfigurationManager.AppSettings["redirect_domain"];

            /// <summary>
            /// 分享域名
            /// </summary>
            public static string Shared_Domain = ConfigurationManager.AppSettings["shared_domain"];

            /// <summary>
            /// 声音文件路径
            /// </summary>
            public const string SOUND = "/Upload/Sound/";
            /// <summary>
            /// 图片文件路径
            /// </summary>
            public const string IMAGE = "/Upload/Image/";
            /// <summary>
            /// 视频文件路径
            /// </summary>
            public const string VIDEO = "/Upload/Video/";

            /// <summary>
            /// 登录页面(相对路径)
            /// </summary>
            public const string LOGIN_URL = "/client/login.html";
            /// <summary>
            /// 登录页面(相对路径)
            /// </summary>
            public const string LoginUrl2 = "/client2/login.html";
            /// <summary>
            /// 图片上传的磁盘目录(非必填项 如：d:/wwwroot/)
            /// </summary>
            public static string UPLOAD_DIR = ConfigurationManager.AppSettings["Upload_Dir"];

            #region 测试版参数
            /*
            public const String URL = "http://192.168.1.155";
            public const String SOUND = "/Upload/Sound/";
            public const String IMAGE = "/Upload/Image/";
            public const String VIDEO = "/Upload/Video/";
            public const String LOGIN_URL = "/client/login.html";
            */
            #endregion

        }

        public static class Cfg
        {

            /// <summary>
            /// android标识
            /// </summary>
            public const int CLIENT_ANDROID = 1;

            /// <summary>
            /// IOS标识
            /// </summary>
            public const int CLIENT_IOS = 2;

            /// <summary>
            /// 验证码发送间隔时间(毫秒)
            /// </summary>
            public const int SMS_CODE_INTERVAL = 60 * 1000;
        }

        public static class UploadType
        {
            /// <summary>
            /// 上传的是图片类型
            /// </summary>
            public const String IMAGE = "image";

            /// <summary>
            /// 上传的是视频类型
            /// </summary>
            public const String VIDEO = "video";

            /// <summary>
            /// 上传的是声音类型
            /// </summary>
            public const String AUDIO = "audio";
        }

        public static class EmailConfig
        {
            /// <summary>
            /// 系统发邮件账号
            /// </summary>
            public const String From_Email = "post@711688.net";
            /// <summary>
            /// 邮件密码
            /// </summary>
            public const String From_Password = "v112233123";
            /// <summary>
            /// 邮件协议
            /// </summary>
            public const String SMTP_HOST = "smtp.exmail.qq.com";

            /// <summary>
            /// 微街秀客服收件箱
            /// </summary>
            public const String KF_Email = "user@711688.com";
        }

        /// <summary>
        /// 微信开放平台配置信息
        /// </summary>
        public static class WeixinOpenConfig
        {
            #region 微信支付、提现参数配置
            /// <summary>
            /// AppID(应用：微街秀)
            /// </summary>
            public const String APPID = "wx15ba429106c24198";

            /// <summary>
            /// 微信支付商户号(应用：微街秀)
            /// </summary>
            public const String MCHID = "1299910501";

            /// <summary>
            /// 商户平台 API秘钥(应用：微街秀)
            /// </summary>
            public const String KEY = "safds24fd1sfdsfd1s2f3ds1sf1d32sf";

            /// <summary>
            /// AppSecret
            /// </summary>
            public const String AppSecret = "d4624c36b6795d1d99dcf0547af5443d";
            #endregion

            #region 微信分享参数配置 (可以与支付的一样,客户端调用的appid有两套，一个用分享，一个用提现)

            //AppID(应用：企动-微街秀)
            public const string APPID_Shared = "wx1cb0929caedf36e8";

            //API密钥(应用：企动-微街秀)
            public const String AppSecret_Shared = "d4624c36b6795d1d99dcf0547af5443d";
            #endregion
        }

        /// <summary>
        /// 短信验配置(统一在这里配置session的key,避免产生重复的key)
        /// </summary>
        public static class Session
        {
            /// <summary>
            /// 短信验证码
            /// </summary>
            public const String SMS_CODE = "sms_code";
        }

        public class AgentConfig
        {
            /// <summary>
            /// 代理商分组(根据此分组，判断代理商是否有微街秀代理权)
            /// </summary>
            public const string AGENT_GROUP = "12";
        }

        /// <summary>
        /// 加密配置
        /// </summary>
        public class EncryptConfig
        {
            /// <summary>
            /// DES加密的秘钥
            /// </summary>
            public const string DES_KEY = "qd711688";
        }
    }
    /// <summary>
    /// 支付宝移动支付配置
    /// </summary>
    public class AliPayConfig
    {
        /// <summary>
        ///合作身份者ID，以2088开头由16位纯数字组成的字符串
        /// </summary>
        public const string PARTNER = "2088121636314395";

        /// <summary>
        /// 商户的私钥
        /// </summary>
        public const string PRIVATE_KEY = @"";

        /// <summary>
        /// 支付宝的公钥，无需修改该值
        /// </summary>
        public const string PUBLIC_KEY = @"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCnxj/9qwVfgoUh/y2W89L6BkRAFljhNhgPdyPuBV64bfQNN1PjbCzkIM6qRdKBoLPXmKKMiFYnkd6rAoprih3/PrQEB/VsW8OoM8fxn67UDYuyBTqA23MML9q1+ilIZwBC2AQ2UBVOrFXfFl75p6/B5KsiNG9zpgmLCUYuLkxpLQIDAQAB";
    }

    /// <summary>
    /// 微信授权登录配置(网页版，公众号中的配置)
    /// </summary>
    public class WXLoginConfig
    {
        /*
            此处的APPID,是来源于公众号: wanghui@711688.cn 中。 
         */
        /// <summary>
        /// 微信公众号身份的唯一标识。(此处是公众号的APPID，不是开发者账号中的APPID)
        /// </summary>
        public const string APPID = "wx5a48f9c519e4452d";

        /// <summary>
        /// JSAPI接口中获取APPSECRET (此处是公众号的APPID，不是开发者账号中的APPSECRET)
        /// </summary>
        public const string APPSECRET = "0f111452b5a533f9ab02de9ccaf911af";

        /// <summary>
        /// 受理商ID，身份标识
        /// </summary>
        public const string MCHID = "";

        /// <summary>
        /// 商户支付密钥Key。审核通过后，在微信发送的邮件中查看
        /// </summary>
        public const string KEY = "";

        /// <summary>
        /// 回调地址
        /// </summary>
        public const string RedirectUri = "http://wjx.711688.cn/api/oauth/wxlogin.ashx?callback";
        

        public static string Url_Sep1 = "https://open.weixin.qq.com/connect/oauth2/authorize?appid={0}&redirect_uri={1}&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect";

    }

    /// <summary>
    /// QQ登录授权
    /// </summary>
    public class QQLoginConfig
    {
        public const string APPID = "101257297";

        public const string APPKEY = "f4e57cfe4f52182e229414153e030ba1";

        /// <summary>
        /// 回调地址
        /// </summary>
        public const string Redirect_Uri = "http%3a%2f%2fwjx.711688.com%2fapi%2foauth%2fqqlogin.ashx";
    }
}